#ifndef BASE_SCREEN_H_GGJ
#define BASE_SCREEN_H_GGJ

/////////////////////////////////////////////////////
// Includes
/////////////////////////////////////////////////////

#include <sfml/Graphics.hpp>
#include "Defines.h"

/////////////////////////////////////////////////////
// Types/Structs
/////////////////////////////////////////////////////

#define MAX_TEXT_BOXES 3

/////////////////////////////////////////////////////
// Classes
/////////////////////////////////////////////////////

class CBaseScreen
{
public:
	CBaseScreen();
	virtual ~CBaseScreen();

	virtual void LayoutScreen();

	virtual void Process(float fTimeDelta);
	virtual void Render(sf::RenderWindow* pWin);
	void		 RenderFade(sf::RenderWindow* pWin);
	virtual void ProcessInput(sf::Event& tEvent);

	void	StartFadeIn();
	void	StartFadeOut();

	bool	IsFading() { return (m_fFadeTimer > 0.0f) ? true : false; }

protected:
	void AddTextBox(const char* pStr, sf::Vector2f vPosition, float fLifetime);

	sf::Texture m_tMsgBoxTex;
	sf::Sprite*	m_pMsgBoxes[MAX_TEXT_BOXES];
	sf::Text*	m_pText[MAX_TEXT_BOXES];
	float		m_fMsgDuration[MAX_TEXT_BOXES];

	sf::Texture m_tBGTex;
	sf::Sprite	m_tBG;

private:
	// Fade
	EFadeState			m_eFadeState;
	sf::RectangleShape	m_tFadeRect;
	float				m_fFadeTimer;

};

#endif